<template>
	<div class="ml-bg-extension-1">
		<div class="ml-bg-extension-002 top-title">
			<div>
				<span class="ml-icon-extension-013"></span>
				<span class="text">盈鱼短期理财-专业版</span>
			</div>
		</div>
		<div class="title1">工薪族短期安全理财</div>
		<div class="title2">
			<p>预期年化收益<span>13%</span></p>
		</div>
		<ul class="extension-ul">
			<li>
				<span class="ml-icon-extension-012"></span>
				<span class="text">银行资金存管</span>
			</li>
			<li>
				<span class="ml-icon-extension-010"></span>
				<span class="text">存取0手续费</span>
			</li>
			<li>
				<span class="ml-icon-extension-011"></span>
				<span class="text">收益每日见</span>
			</li>
		</ul>
		<div v-on:click="goDownload" class="downloadBtn">立即下载赚钱</div>
		<div style="height:20px; width:100%;background:#fff;"></div>
		<p class="bottom1">Copyright© 2017-2057 浙江康宏投资管理有限公司</p>
		<p class="bottom3">浙ICP备18001503号-1</p>
		<p class="bottom2">
			<span>浙江康宏投资管理有限公司</span>&nbsp;&nbsp;&nbsp;
			<span>市场有风险  理财需谨慎</span>
		</p>
	</div>
</template>

<script>
import request from "../../config/request.js"
import {bus} from "../../config/bus.js"
import judgeSystem from "../../config/judgeSystem.js"
export default{
	data() {
		return {
			dUrl:{
				ios:null,
				android:null
			},
			downloadUrl:null,
			show:null,
			isWechat:false,
			showBtn:false
		}
	},
	created() {
		setTimeout(function(){
			var ta = document.createElement('script'); ta.type = 'text/javascript'; ta.async = true;
        	ta.src = 'https://s13.cnzz.com/z_stat.php?id=1273270048&web_id=1273270048';
        	document.getElementsByTagName('body')[0].append(ta);		
		})

		var detect = judgeSystem.detect(navigator.userAgent);
		var self = this;
		var system;
		var channel;
		if(detect.os.ios){
			system = 'ios';
			channel = 'ios';
		}else{
			system = 'android';
			channel = self.$route.params.channel;
		}
		if(detect.app.wechat) {			    	
			this.$data.isWechat=true;
		}
		self.$.ajax({ 
			url:'/fish-backend/apis/app/getDownloadPath',   //提交的url
			type:'GET',
			beforeSend:function(xhr){		  	        		
				xhr.setRequestHeader('appidentifier',system);	
				xhr.setRequestHeader('source','web');
				xhr.setRequestHeader('channel',channel);	
		    },
		    success:function(res){
				self.$data.downloadUrl = res.data.downloadPath;
				self.$data.showBtn = true;
			}
		});	
			
	},
	mounted(){
		var h = window.innerHeight;
		//this.$(".ml-bg-extension-1").height(h);
	},
	methods: {
		goDownload(){
			_czc.push(['_trackEvent', '短页面下载按钮', '下载']);	
			location.href = this.$data.downloadUrl;
		}
	}
}		
</script>

<style lang="scss">
.ml-bg-extension-1{
	position:relative;
	background:#fff;
	.top-title{
		div{
			overflow: hidden;
			padding-top:10px;
			.text{
				font-family: PingFang-SC-Regular;
				font-size: 34px;
				color: #FFFFFF;
				letter-spacing: 0;
				text-shadow: 0 0 6px rgba(0,0,0,0.30);
				display: inline-block;
				float:left;
				margin-left:15px;
				line-height:110px;
			}
		}
	}
	.title1{
		font-family: PingFang-SC-Medium;
		font-size: 50px;
		color: #DC0039;
		text-align: center;
		padding:40px;
	}
	.title2{
		text-align: center;
		p{
			border: 2px solid #979797;
			display: inline-block;
			font-size: 36px;
			font-family: PingFangSC-Regular;
			color:#4F4F4F;
			margin:0 auto;
			text-align: center;
			padding:15px;
			span{
				font-weight: bold;
			}
		}
	}
	.extension-ul{
		overflow: hidden;
		margin-top:20px;
		li{
			float:left;
			width:33%;
			text-align: center;
			padding-left:40px;
			padding-top:20px;
			box-sizing: border-box;
			.text{
				font-family: PingFang-SC-Regular;
				font-size: 20px;
				color: #464646;
				letter-spacing: -0.78px;
				display: inline-block;
				line-height:70px;
			}
		}
	}
	.downloadBtn{
		font-family: PingFang-SC-Regular;
		font-size: 40px;
		color: #FFFFFF;
		letter-spacing: -1.56px;
		background: #F76162;
		border: 2px solid #F76162;
		border-radius: 10px;
		text-align: center;
		width:85%;
		margin:0 auto;
		padding:25px 0;
		margin-top:15px;
		/*position:absolute;
		bottom:10%;
		left:7%;*/
	}
	.bottom1{
		font-family: PingFangSC-Light;
		font-size: 20px;
		color: #959595;
		letter-spacing: 0;
		text-align: center;
		//position:fixed;
		width:100%;
		bottom:100px;
		margin-bottom:5px;
	}
	.bottom3{
		font-family: PingFangSC-Light;
		font-size: 20px;
		color: #959595;
		letter-spacing: 0;
		text-align: center;
		//position:fixed;
		width:100%;
		bottom:65px;
		margin-bottom:5px;
	}
	.bottom2{
		background: #F76162;
		text-align: center;
		//position:fixed;
		width:100%;
		bottom:0;
		padding:15px 0;
		span:first-child{
			font-family: PingFang-SC-Regular;
			font-size: 24px;
			color: #FFFFFF;
			letter-spacing: 0;
		}
		span:last-child{
			opacity: 0.8;
			font-family: PingFang-SC-Light;
			font-size: 20px;
			color: #FFFFFF;
		}
	}
}
</style>